<script type="text/javascript">
var successFun=function(res){
if(res.code==200){
	alert('更新成功！');
	document.location.reload();
}else{
	alert('出错了！');
}
}
$(document).ready(function() { 
	var updateOptions	= {dataType:'json',error:doError,success:doSuccess}
    $('#form').ajaxForm(updateOptions); 
}); 
</script>
<div class="page-title">
	<div class="in">
    		<div class="titlebar"><h2>返利设置</h2><p></p></div>
            <div class="clear"></div>
    </div>
</div>
<div class="content">
	<div class="simplebox grid740">
    	<div class="titleh">
        	<h3>返利设置</h3>
        </div>
        <div class="body">
          <form id="form" action="{url('Setting','SaveReturn')}" method="post">
          	<div class="st-form-line">	
            	<span class="st-labeltext">返利比例</span>	
                <input type="text" style="width: 200px;" class="st-forminput" name="rate" id="rate-input" value="{if $info['rate']}{$info['rate']}{else}0{/if}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="rate-info" etype="error-info">如果设置为大于0的数字，那么用户通过网站购买的商品，能获得设定的比例的返利。设置为0关闭该功能</div>
            	<div class="clear"></div>
            </div>
            
            <div class="st-form-line">	
            	<span class="st-labeltext">分享返利</span>	
                <input type="text" style="width: 200px;" class="st-forminput" name="share_rate" id="share_rate-input" value="{if $info['share_rate']}{$info['share_rate']}{else}0{/if}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="share_rate-info" etype="error-info">如果设置为大于0的数字，那么用户在网站上分享的商品，如果有人去购买，那么这个分享的用户可以获得设定的比例的佣金。设置为0关闭该功能</div>
            	<div class="clear"></div>
            </div>
            
          	<div class="st-form-line">	
            	<span class="st-labeltext">注册佣金</span>	
                <input type="text" style="width: 200px;" class="st-forminput" name="reg_money" id="reg_money-input" value="{$info['reg_money']}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="reg_money-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
            
            <div class="st-form-line">	
            	<span class="st-labeltext">提现下限</span>	
                <input type="text" style="width: 200px;" class="st-forminput" name="return_min" id="return_min-input" value="{$info['return_min']}"> 
                <div class="clear"></div>
                <div class="st-form-error" id="return_min-info" etype="error-info"></div>
            	<div class="clear"></div>
            </div>
            
            <div class="button-box">
           	  <input type="submit" class="st-button" value="确认">
           	  <input type="reset" class="st-clear" value="取消">
            </div>
          </form>
        </div>
    </div>
</div>